package fr.inserm.u674.chcdbweb.model.DTO;

public class TissueObservation extends TissueManipulation {

	private String observation;

	public TissueObservation() {
	}

	public TissueObservation(Long manipulationID) {
		super(manipulationID);
	}

	public String getObservation() {
		return observation;
	}

	public void setObservation(String observation) {
		this.observation = observation;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof TissueObservation
			&& ((TissueObservation) obj).getManipulationID().equals(getManipulationID()))
			return true;
		else
			return false;
	}

	@Override
	public int hashCode() {
		if (getManipulationID() != null)
			return this.getClass().hashCode() + getManipulationID().hashCode();
		return super.hashCode();
	}

	@Override
	public String toString() {
		return getTissueManipulated() + " " + getManipulationDate() + " " + getExperimenter()
			+ " observation : " + observation;
	}

}
